package com.gzx.spring.apis.controller;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.gzx.risk.core.pojo.CommonResult;
import com.gzx.risk.core.tags.CommonLog;
import com.gzx.spring.apis.service.YuyaoService;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;

@Tag(name = "羽耀apis验证")
@RestController
@RequestMapping("/apis/yuyao")
public class ApisYuyaoController {

	@Resource
	private YuyaoService yuyaoService;

	@Operation(summary = "ra_high_score")
	@CommonLog("ra_high_score")
	@PostMapping("/ra_high_score")
	public CommonResult<String> ra_high_score(@RequestParam(name = "name") String name,
			@RequestParam(name = "id") String id, @RequestParam(name = "phone") String phone) throws Exception {
		String result = yuyaoService.ra_high_score(name, id, phone);
		return CommonResult.ok(result);
	}
	
	@Operation(summary = "brdt_score")
	@CommonLog("brdt_score")
	@PostMapping("/brdt_score")
	public CommonResult<String> brdt_score(@RequestParam(name = "name") String name,
			@RequestParam(name = "id") String id, @RequestParam(name = "phone") String phone) throws Exception {
		String result = yuyaoService.brdt_score(name, id, phone);
		return CommonResult.ok(result);
	}
	
	@Operation(summary = "gatewayC108139")
	@CommonLog("gatewayC108139")
	@PostMapping("/gatewayC108139")
	public CommonResult<String> gatewayC108139(@RequestParam(name = "phone") String phone) throws Exception {
		String result = yuyaoService.gatewayC108139(phone);
		return CommonResult.ok(result);
	}
	
	@Operation(summary = "gatewayC108144")
	@CommonLog("gatewayC108144")
	@PostMapping("/gatewayC108144")
	public CommonResult<String> gatewayC108144(@RequestParam(name = "name") String name,
			@RequestParam(name = "id") String id, @RequestParam(name = "phone") String phone) throws Exception {
		String result = yuyaoService.gatewayC108144(name, id, phone);
		return CommonResult.ok(result);
	}
	
	@Operation(summary = "mobileOnLineVerify")
	@CommonLog("mobileOnLineVerify")
	@PostMapping("/mobileOnLineVerify")
	public CommonResult<String> mobileOnLineVerify(@RequestParam(name = "phone") String phone) throws Exception {
		String result = yuyaoService.mobileOnLineVerify(phone);
		return CommonResult.ok(result);
	}
	
	@Operation(summary = "mobilestatus")
	@CommonLog("mobilestatus")
	@PostMapping("/mobilestatus")
	public CommonResult<String> mobilestatus(@RequestParam(name = "phone") String phone) throws Exception {
		String result = yuyaoService.mobilestatus(phone);
		return CommonResult.ok(result);
	}
	
	@Operation(summary = "gatewayC108143")
	@CommonLog("gatewayC108143")
	@PostMapping("/gatewayC108143")
	public CommonResult<String> gatewayC108143(@RequestParam(name = "name") String name,
			@RequestParam(name = "id") String id, @RequestParam(name = "phone") String phone) throws Exception {
		String result = yuyaoService.gatewayC108143(name, id, phone);
		return CommonResult.ok(result);
	}
	
	@Operation(summary = "personal")
	@CommonLog("personal")
	@PostMapping("/personal")
	public CommonResult<String> personal(@RequestParam(name = "name") String name,
			@RequestParam(name = "id") String id, @RequestParam(name = "authDate") String authDate) throws Exception {
		String result = yuyaoService.personal(name, id, authDate);
		return CommonResult.ok(result);
	}
}
